CSCIĀ 0039. Introduction to Computer Architecture and Assembly Language

Units: 3
Prerequisite: Completion of CSCI 10 with grade of "C" or better
Hours: 72 (54 lecture, 18 laboratory)
Assembly language programming techniques and introductory computer architecture concepts. Topics include addressing modes; pseudo operations; stack processing; subroutine linkage; arithmetic and logical operations; input and output; digital logic. Programs are designed, coded, tested, and debugged. (C-ID COMP 142) (CSU, UC)

CSCI 0039 - Introduction to Computer Architecture and Assembly Language

http://catalog.sierracollege.edu/course-outlines/csci-0039/

Catalog Description DESCRIPTION IS HERE: Prerequisite: Completion of CSCI 10 with grade of "C" or better Hours: 72 (54 lecture, 18 laboratory) Description: Assembly language programming techniques and introductory computer architecture concepts. Topics include addressing modes; pseudo operations; stack processing; subroutine linkage; arithmetic and logical operations; input and output; digital logic. Programs are designed, coded, tested, and debugged. (C-ID COMP 142) (CSU, UC) Units 3 Lecture-Discussion 54 Laboratory 18 By Arrangement Contact Hours 72 Outside of Class Hours Course Student Learning Outcomes Write simple assembly language program segments. Implement a machine level language program based on the given high level language program. Explain the internal representation of integer, floating point and non-numeric representation of data. Explain addressing modes used to access data. Use fundamental logic gates to design and implement combinational and sequential digital circuits. Course Content Outline 1. Fundamentals of Computer Architecture 1.1 The Universal Machine 1.2 Abstract Model of a Computer 1.2.1 CPU 1.2.2 Memory 1.2.3 Input-Output 1.2.4 Mass Storage 1.3 Microprocessor and Microcontrollers 1.3.1 Microcontroller is a computer on a chip 2. High-Level Language (HLL) vs. Low-Level Language (LLL) 2.1 HLL Advantages 2.1.1 Portable 2.1.2 Increased Productivity 2.1.3 English-like (ease of learning) 2.2 LLL Advantages 2.2.1 Speed 2.2.2 Size 2.2.3 Direct access to hardware 3. Numeric Base Conversions 3.1 Binary to Decimal 3.2 Decimal to Binary 3.3 Binary to Hexadecimal 3.4 Hexadecimal to Binary 3.5 Hexadecimal to Decimal 3.6 Universal conversion process 4. Architecture of Target Microcontroller 4.1 Processor 4.1.1 General Purpose Registers 4.1.2 Condition Code Register 4.1.3 Program Counter 4.2 Memory 4.2.1 RAM; Data Memory 4.2.2 Flash; Program Memory 4.3 Input-Output 4.3.1 General Purpose Parallel Ports 4.3.2 Peripherals 4.3.2.1 USART 4.3.2.2 Analog to Digital Converter 4.3.2.3 Counter-Timer 4.4 Architecture models 4.4.1 von Neumann 4.4.2 Harvard dual port 4.4.3 Multi-core 5. Instruction Set and Addressing Modes 5.1 Arithmetic Instructions 5.2 Logical Instructions 5.3 Addressing Modes 5.3.1 Implicit 5.3.2 Register 5.3.3 Memory Direct 5.3.4 Memory Indirect 5.4 Load and Store Instructions 6. Multi-byte Arithmetic 6.1 16-bit addition 6.2 16-bit subtraction 7. High-Level Pseudocode to Assembly Language Translation 7.1 Variable Assignment 7.2 Arithmetic Expressions 7.3 If statement 7.4 If-else statement 7.5 While loop 7.6 For loop 8. Code Conversion 8.1 Binary to ASCII Decimal 8.1.1 8-bit unsigned division algorithm 8.2 Binary to ASCII Hex 8.2.1 Solution by Calculation 8.2.2 Solution by Table Look-up 8.3 ASCII Decimal to Binary 8.3.1 8-bit unsigned multiplication algorithm 8.4 ASCII Hex to Binary 9. Input-Output 9.1 Parallel Port Configuration 9.1.1 Output: LEDs 9.1.2 Input: Push button switches 9.2 Programming the USART for Serial I-O Course Objectives Course Objectives Lecture Objectives: 1. Describe the programmer's model of the target computer. 2. Describe the operation and use of an assembler. 3. Pseudocode algorithms that perform multi-byte arithmetic. 4. Pseudocode algorithms that perform code conversion. 5. Pseudocode algorithms that make use of the input-output devices, such as the USART, on the microcontroller. 6. Demonstrate the ability to convert high-level pseudocode algorithms to assembly language. 7. Compare and contrast RISC and CISC architectures. 8. Compare and contrast microcontrollers and microprocessors. Laboratory Objectives: 1. Demonstrate the ability to use an assembly language integrated development environment. 2. Write assembly language programs that use multi-byte arithmetic and memory load-store operations. 3. Write assembly language programs that make use of LEDs as output devices and switches as input devices. 4. Write assembly language programs that perform code conversion. 5. Write assembly language programs that make use of common peripherals including the USART, timer-counter, analog to digital converter, pulse-width modulator, and EEPROM. 6. Write assembly language programs that interface to external peripherals using the SPI or I2C bus. 7. Write assembly language programs that interface assembly language modules to a high-level language program. 8. Write assembly language programs that demonstrate fundamental operating system concepts. 9. Design combinational logic circuits. Methods of Evaluation Objective Examinations Problem Solving Examinations Skill Demonstrations Reading Assignments 1. Read Chapter Three in Upton, Electronic Memory (pages 47-91). Create a table showing the various types of memory, a short description of each type, and the access time in nanoseconds and be prepared to discuss in class. 2. Read Chapter four in Upton, System on a Chip (SOC) and be prepared to discuss in class. Writing, Problem Solving or Performance 1. Implement the binary to ASCII decimal algorithm discussed in class. Use register R16 to pass the binary number into the subprogram, and a four byte memory buffer to store the result. Test Data Pass each of the following numbers to your binary to ASCII decimal subprogram: 0b00000001 0b11111111 0b10100101 0b00000000 0b11001100 You must call the subprogram once for each test datum. So there should be 5 calls to your subprogram in your main program. Make sure you clear the memory buffer before each call. 2. Write a pair of programs that count and display the number of times the switch connected to the low order bit of Port D is pressed. The first program accepts the switch input without debounce, and the second program adds a debounce delay. Recall that when a switch is pressed, the corresponding bit of the input port goes to logic-level 0. Other (Term projects, research papers, portfolios, etc.) Methods of Instruction Laboratory Lecture/Discussion Distance Learning Other materials and-or supplies required of students that contribute to the cost of the course.